#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <unistd.h>

int main()
{
  pid_t pid;
  printf("Begin\n");
  if ((pid = fork()) == 0) {
    // child
    printf("child process executed\n");
    exit(0);
  } else if (pid < 0) {
    perror("fork");
    exit(1);
  }

  // father
  //sleep(1);
  printf("parent process executed\n");
  exit(0);
}
